enum OsnIdType:Int {
    case none
    case user
    case group
    case dapp
    
    init(rawValue: Int) {
        switch rawValue {
        case 0: self = .none
        case 1: self = .user
        case 2: self = .group
        case 3: self = .dapp
        default: self = .none
        }
    }
    static func idType(osnId:String) ->OsnIdType {
        if osnId.starts(with: "OSNU"){
            return .user
        }else if osnId.starts(with: "OSNG") {
            return .group
        }else if osnId.starts(with: "OSNS") {
            return .dapp
        }
        return .none
    }
}
enum OsnUploadType: Int {
    case temp
    case userPortrait
    case groupPortrait
    
    init(rawValue: Int) {
        switch rawValue {
        case 0: self = .temp
        case 1: self = .userPortrait
        case 2: self = .groupPortrait
        default: self = .temp
        }
    }
}
